<?php
namespace app\admin\controller;
use think\Controller;
// use think\Request;
// use think\facade\Db;
use think\facade\Request;

class Index extends Controller
{
    //构造方法请求
    // protected $request;
    // public function __construct(Request $request)
    // {
    //     $this->request=$request;
    // }


    public function index()
    {
        // return $this->fetch('index',['name'=>'zhangsan','age'=>18]);
        // $this->assign('name','lisi');
        //助手函数
        // return view('index',['name'=>'zhangsan','age'=>18]);

        //1.请求/构造方法请求
        // dump($this->request->param());
        //2.静态调用请求对象
        // return Request::param();
        // $data=Db::table('user')->select();
        // dump($data);
        // dump(db('user')->select());
        return $this->fetch();
}
}